//
//  BtnPer.h
//  PlantNannyDemo
//
//  Created by Joueu on 14-10-24.
//
//

#ifndef __PlantNannyDemo__BtnPer__
#define __PlantNannyDemo__BtnPer__

#include "cocos2d.h"
#include "XKProgressTimer.h"
#include "cocos-ext.h"

USING_NS_CC;
USING_NS_CC_EXT;

class BtnPer:public ui::Button{
public:
    CREATE_FUNC(BtnPer);
    virtual bool init();
    void updatePer(int addend);
private:
    XKProgressTimer *m_timer;
    Label *m_perLabel;
private:
    float m_percentage;
    float _toDrink;
    virtual void update(float delta);
    void updateLbl(float delta);
    float _from;
    float _to;
    float _tmp;
    float _time;
    
private:
    int tmpForAnimation;
};

#endif /* defined(__PlantNannyDemo__BtnPer__) */
